<!doctype html>
<html lang="en">
<head>
    <title>Upload - Overview</title>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="description" content="Overview" />
    <meta name="keywords" content="" />
    <meta name="author" content="ComponentOne" />
    
	<link href="../../themes/aristo/jquery-wijmo.css" rel="stylesheet" type="text/css" />
    
	<link href="../../themes/wijmo/jquery.wijmo-open.2.3.2.css" rel="stylesheet" type="text/css" />
    <link href="../../themes/wijmo/jquery.wijmo.wijupload.css" rel="stylesheet" type="text/css" />
	<script src="../../external/jquery-1.8.2.min.js" type="text/javascript"></script>
	<script src="../../external/jquery-ui-1.9.1.custom.min.js" type="text/javascript"></script>
    <script src="../../external/jquery.wijmo-open.all.2.3.2.min.js" type="text/javascript"></script>
    <script src="../../external/swfupload.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.wijmo.wijupload.js" type="text/javascript"></script>
	<style type="text/css">
	.Loading
	{
		width: 37px;
		height: 37px;
		background-image: url("../images/waiting.gif");
	}
	</style>
	<script id="script1" type="text/javascript">
		var supportXhr,enableSWFUploadOnIE;
		$(document).ready(function () {
		    var progressbar = $("#progressbar");
		    var upload = $("#upload").wijupload({
		        multiple: true,
		        swfUploadOptions: {
		            swf: '../../wijmo/SWFUpload.swf',
		            'auto': false
		        },
		        enableSWFUploadOnIE: true,
		        change: function (e, data) {
		        },
		        upload: function (e, data) {
		        },
		        totalUpload: function () {
		            progressbar.show();
		        },
		        complete: function (e, data) {
		        },
		        totalComplete: function () {
		            progressbar.fadeOut(1500, function () {
		                if (supportXhr || (enableSWFUploadOnIE && $.browser.msie)) {
		                    $("#progressbar").wijprogressbar("option", "value", 0);
		                }
		            });
		        },
		        totalProgress: function (e, data) {
		            if (supportXhr || (enableSWFUploadOnIE && $.browser.msie)) {
		                var percent = Math.round(data.loaded * 100 / data.total);
		                //console.log(data.loaded +" "+ data.total)
		                $("#progressbar").wijprogressbar("option", "maxValue", 100);
		                $("#progressbar").wijprogressbar("option", "value", percent);
		            }
		        },
		        action: "upload.ashx"
		    });
		    supportXhr = $("#upload").wijupload("supportXhr");
		    enableSWFUploadOnIE = $("#upload").wijupload("option", "enableSWFUploadOnIE");
		    if (supportXhr || (enableSWFUploadOnIE && $.browser.msie)) {
		        progressbar.wijprogressbar();
		    } else {
		        progressbar.addClass("Loading");
		    }
		    progressbar.hide();
		});
    </script>
</head>
<body class="demo-single">
    <div class="container">
        <div class="header">
            <h2>
                Overview</h2>
        </div>
        <div class="main demo">
            <!-- Begin demo markup -->
			<div id="upload" style="width: 300px">
			</div>
			<div id="progressbar"></div>
            <!-- End demo markup -->
            <div class="demo-options">
                <!-- Begin options markup -->
                <!-- End options markup -->
            </div>
        </div>
        <div class="footer demo-description">
        </div>
    </div>
</body>
</html>
